class Middleware():
    def before_request(self,request):
        return request
    def after_request(self,request):
        return request
    def before_response(self,request,response):
        return response
    def after_response(self,request,response):
        return response
    def exception_request(self,request,exception):
        pass
    def exception_response(self,response,exception):
        pass